var baseUrl = `http://localhost:8080/top/playlists`
function http(url) {
  return new Promise((resolve, reject) => {
    wx.request({
      url: baseUrl + url,
      success: (result) => {
        resolve(result)
      },
      fail: (err) => {
        reject(err)
      },
    })
  })
}

function getMovieHttp(offset) {
  return http(`?offset=${offset}&limit=5`)
}

module.exports = {
  getMovieHttp
}